package com.sa07.config;

import java.io.BufferedInputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.InputStream;

import com.sa07.bean.SystemConstant;
import com.sa07.db.DbConfig;
import com.sa07.db.OracleSessionFactory;

/**
 * oracle配置初始化
 * 
 * @author Long.shangbo
 *
 * 2014-2-21 上午11:32:03
 */
public class OracleConfigInit extends DataBaseConfigInit {
	
	private static final String ORACLE_CONFIG_FILE = "oracle_config.properties";

	@Override
	protected void processConfig(DbConfig config) {
		OracleSessionFactory.getFactory().buildFactory(config);
	}
     
	@Override
	protected InputStream getConfigInputStream() throws Exception {
		return new BufferedInputStream(
				new FileInputStream(SystemConstant.CONFIG_DIR + File.separator
						+ ORACLE_CONFIG_FILE));
	}

}
